/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package repositoriumhbringas.coolthings;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.io.IOException;

/**
 *This class uses the Java Robot. This class is little
 * sample of what you can do with java robot.
 * @author HugoBringas
 */
public class JavaRobot {
    //The keys of the keys inputs...
    static int keysInputs[]={KeyEvent.VK_H,KeyEvent.VK_E,KeyEvent.VK_L,KeyEvent.VK_L,
    KeyEvent.VK_O,KeyEvent.VK_SPACE,KeyEvent.VK_H,KeyEvent.VK_U,KeyEvent.VK_G,KeyEvent.VK_O,
    KeyEvent.VK_SPACE,KeyEvent.VK_B,KeyEvent.VK_R,KeyEvent.VK_I,KeyEvent.VK_N,KeyEvent.VK_G,
    KeyEvent.VK_A,KeyEvent.VK_S};
    public static void main (String hbringas[]) throws AWTException, IOException{
    //Object Robot
        Robot myrobot= new Robot();
        //An Extra for type the inputs in the note pad
        Runtime.getRuntime().exec("notepad");

        //Typing into the notepad...
        for(int h=0;h<keysInputs.length;h++){
        //Delay.. for wait the next input
            myrobot.delay(200);

            //Typing...
            myrobot.keyPress(keysInputs[h]);
        }
//Excute in this way.
        //Click on the class(obviously the class that contains the Robot)
        //Right-Click and Run

    }

}
